
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-100"></use>
                    </svg>
                    <div class="name">100</div>
                    <div class="fontclass">#icon-100</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-102"></use>
                    </svg>
                    <div class="name">102</div>
                    <div class="fontclass">#icon-102</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-103"></use>
                    </svg>
                    <div class="name">103</div>
                    <div class="fontclass">#icon-103</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-104"></use>
                    </svg>
                    <div class="name">104</div>
                    <div class="fontclass">#icon-104</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-200"></use>
                    </svg>
                    <div class="name">200</div>
                    <div class="fontclass">#icon-200</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-201"></use>
                    </svg>
                    <div class="name">201</div>
                    <div class="fontclass">#icon-201</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-202"></use>
                    </svg>
                    <div class="name">202</div>
                    <div class="fontclass">#icon-202</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-203"></use>
                    </svg>
                    <div class="name">203</div>
                    <div class="fontclass">#icon-203</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-204"></use>
                    </svg>
                    <div class="name">204</div>
                    <div class="fontclass">#icon-204</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-205"></use>
                    </svg>
                    <div class="name">205</div>
                    <div class="fontclass">#icon-205</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-206"></use>
                    </svg>
                    <div class="name">206</div>
                    <div class="fontclass">#icon-206</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-207"></use>
                    </svg>
                    <div class="name">207</div>
                    <div class="fontclass">#icon-207</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-208"></use>
                    </svg>
                    <div class="name">208</div>
                    <div class="fontclass">#icon-208</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-209"></use>
                    </svg>
                    <div class="name">209</div>
                    <div class="fontclass">#icon-209</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-210"></use>
                    </svg>
                    <div class="name">210</div>
                    <div class="fontclass">#icon-210</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-211"></use>
                    </svg>
                    <div class="name">211</div>
                    <div class="fontclass">#icon-211</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-212"></use>
                    </svg>
                    <div class="name">212</div>
                    <div class="fontclass">#icon-212</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-213"></use>
                    </svg>
                    <div class="name">213</div>
                    <div class="fontclass">#icon-213</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-300"></use>
                    </svg>
                    <div class="name">300</div>
                    <div class="fontclass">#icon-300</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-301"></use>
                    </svg>
                    <div class="name">301</div>
                    <div class="fontclass">#icon-301</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-302"></use>
                    </svg>
                    <div class="name">302</div>
                    <div class="fontclass">#icon-302</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-303"></use>
                    </svg>
                    <div class="name">303</div>
                    <div class="fontclass">#icon-303</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-304"></use>
                    </svg>
                    <div class="name">304</div>
                    <div class="fontclass">#icon-304</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-305"></use>
                    </svg>
                    <div class="name">305</div>
                    <div class="fontclass">#icon-305</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-306"></use>
                    </svg>
                    <div class="name">306</div>
                    <div class="fontclass">#icon-306</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-307"></use>
                    </svg>
                    <div class="name">307</div>
                    <div class="fontclass">#icon-307</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-308"></use>
                    </svg>
                    <div class="name">308</div>
                    <div class="fontclass">#icon-308</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-309"></use>
                    </svg>
                    <div class="name">309</div>
                    <div class="fontclass">#icon-309</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-310"></use>
                    </svg>
                    <div class="name">310</div>
                    <div class="fontclass">#icon-310</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-311"></use>
                    </svg>
                    <div class="name">311</div>
                    <div class="fontclass">#icon-311</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-312"></use>
                    </svg>
                    <div class="name">312</div>
                    <div class="fontclass">#icon-312</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-313"></use>
                    </svg>
                    <div class="name">313</div>
                    <div class="fontclass">#icon-313</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-400"></use>
                    </svg>
                    <div class="name">400</div>
                    <div class="fontclass">#icon-400</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-401"></use>
                    </svg>
                    <div class="name">401</div>
                    <div class="fontclass">#icon-401</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-402"></use>
                    </svg>
                    <div class="name">402</div>
                    <div class="fontclass">#icon-402</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-403"></use>
                    </svg>
                    <div class="name">403</div>
                    <div class="fontclass">#icon-403</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-404"></use>
                    </svg>
                    <div class="name">404</div>
                    <div class="fontclass">#icon-404</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-405"></use>
                    </svg>
                    <div class="name">405</div>
                    <div class="fontclass">#icon-405</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-406"></use>
                    </svg>
                    <div class="name">406</div>
                    <div class="fontclass">#icon-406</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-407"></use>
                    </svg>
                    <div class="name">407</div>
                    <div class="fontclass">#icon-407</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-500"></use>
                    </svg>
                    <div class="name">500</div>
                    <div class="fontclass">#icon-500</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-501"></use>
                    </svg>
                    <div class="name">501</div>
                    <div class="fontclass">#icon-501</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-502"></use>
                    </svg>
                    <div class="name">502</div>
                    <div class="fontclass">#icon-502</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-503"></use>
                    </svg>
                    <div class="name">503</div>
                    <div class="fontclass">#icon-503</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-504"></use>
                    </svg>
                    <div class="name">504</div>
                    <div class="fontclass">#icon-504</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-507"></use>
                    </svg>
                    <div class="name">507</div>
                    <div class="fontclass">#icon-507</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-508"></use>
                    </svg>
                    <div class="name">508</div>
                    <div class="fontclass">#icon-508</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-101"></use>
                    </svg>
                    <div class="name">101</div>
                    <div class="fontclass">#icon-101</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-999"></use>
                    </svg>
                    <div class="name">999</div>
                    <div class="fontclass">#icon-999</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-900"></use>
                    </svg>
                    <div class="name">900</div>
                    <div class="fontclass">#icon-900</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-901"></use>
                    </svg>
                    <div class="name">901</div>
                    <div class="fontclass">#icon-901</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
